package main

import (
	"encoding/xml"
	"fmt"
	"io"
	"log"
	"os"
)

func main() {
	dec := xml.NewDecoder(os.Stdin)
	for {
		tok, err := dec.Token()
		if err == io.EOF {
			break
		}
		if err != nil {
			log.Fatal(err)
		}

		switch tok := tok.(type) {
		case xml.StartElement:
			fmt.Printf("Start: %s\n", tok.Name.Local)
		case xml.EndElement:
			fmt.Printf("End: %s\n", tok.Name.Local)
		case xml.CharData:
			fmt.Printf("CharData: %s\n", tok.Name.Local)
		}
	}
}
